const Layout = () => import('@/layout/admin-layout.vue')

export default {
  name: 'Admin',
  path: '/admin',
  component: Layout,
  redirect: '/admin/index',
  meta: {
    title: '',
    icon: 'uil:pagelines',
    role: [],
    requireAuth: false,
    keepAlive: true,
  },
  children: [
    {
      name: 'AdminIndex',
      path: 'index',
      component: () => import('./index.vue'),
      meta: {
        title: '首页',
        icon: 'mdi:home-outline',
        role: [],
        requireAuth: false,
        order: -1,
        keepAlive: true,
      },
    },
    {
      name: 'PersonSetting',
      path: '/admin/person-setting',
      component: () => import('./tool/index.vue'),
      isHidden: true,
      meta: {
        title: '个人设置',
        role: ['SUPERADMIN'],
        requireAuth: true,
        keepAlive: true,
      },
    },
    {
      name: 'AccountManage',
      path: 'account-manage',
      redirect: '/admin/system/account-manage/account-manage-list',
      meta: {
        title: '账号管理',
        icon: 'material-symbols:user-attributes-outline',
        role: ['SUPERADMIN'],
        requireAuth: true,
        keepAlive: true,
      },
      children: [
        {
          name: 'RoleManage',
          path: 'role-manage',
          component: () => import('./system/account-manage/role-manage.vue'),
          meta: {
            title: '角色管理',
            icon: 'eos-icons:role-binding-outlined',
            role: ['SUPERADMIN'],
            requireAuth: true,
            keepAlive: true,
          },
        },
        {
          name: 'AdminManage',
          path: 'admin-manage',
          component: () => import('./system/account-manage/admin-manage.vue'),
          meta: {
            title: '用户管理',
            icon: 'material-symbols:person-raised-hand-outline',
            role: ['SUPERADMIN'],
            requireAuth: true,
            keepAlive: true,
          },
        },
      ],
    },

    {
      name: 'CategoryManage',
      path: 'category',
      redirect: '/admin/category/category-list',
      meta: {
        title: '产品管理',
        icon: 'streamline:shopping-bag-hand-bag-1-shopping-bag-purse-goods-item-products',
        role: ['SUPERADMIN'],
        requireAuth: true,
        keepAlive: true,
      },
      children: [
        {
          name: 'ProductList',
          path: 'product-list',
          component: () => import('./product/product-list.vue'),
          meta: {
            title: '产品列表',
            icon: 'tabler:category',
            role: ['SUPERADMIN'],
            requireAuth: true,
            keepAlive: true,
          },
        },
        {
          name: 'ProductDetail',
          path: 'product-detail',
          component: () => import('./product/product-detail.vue'),
          isHidden: true,
          meta: {
            title: '产品详情',
            icon: 'tabler:category',
            role: ['SUPERADMIN'],
            requireAuth: true,
            keepAlive: true,
          },
        },
        {
          name: 'ProductClassification',
          path: 'category-list',
          component: () => import('./category/category-list.vue'),
          meta: {
            title: '产品分类',
            icon: 'carbon:classification',
            role: ['SUPERADMIN'],
            requireAuth: true,
            keepAlive: true,
          },
        },
        {
          name: 'AddCategoryForm',
          path: 'category-add',
          isHidden:true,
          component: () => import('./category/components/category-add.vue'),
          meta: {
            title: '添加分类',
            role: ['SUPERADMIN'],
            requireAuth: true,
            keepAlive: true,
          },
        },
        {
          name: 'ProductAttribute',
          path: 'category-attribute',
          component: () => import('./category/category-attribute.vue'),
          meta: {
            title: '产品属性',
            icon: 'material-symbols:collections-bookmark-outline',
            role: ['SUPERADMIN'],
            requireAuth: true,
            keepAlive: true,
          },
        },
        {
          name: 'AddAttributeForm',
          path: 'attribute-add',
          isHidden: true,
          component: () => import('./category/components/attribute-add.vue'),
          meta: {
            title: '新增产品属性',
            icon: 'material-symbols:collections-bookmark-outline',
            role: ['SUPERADMIN'],
            requireAuth: true,
            keepAlive: true,
          },
        },
        {
          name: 'UpdateAttributeForm',
          path: 'attribute-update',
          isHidden: true,
          component: () => import('./category/components/attribute-edit.vue'),
          meta: {
            title: '编辑产品属性',
            icon: 'material-symbols:collections-bookmark-outline',
            role: ['SUPERADMIN'],
            requireAuth: true,
            keepAlive: true,
          },
        },
        {
          name: 'ProductBrand',
          path: 'category-brand',
          component: () => import('./category/category-brand.vue'),
          meta: {
            title: '产品品牌',
            icon: 'tabler:brand-arc',
            role: ['SUPERADMIN'],
            requireAuth: true,
            keepAlive: true,
          },
        },
      ],
    },
    {
      name: 'StoreManage',
      path: 'store',
      redirect: '/admin/store/cache',
      meta: {
        title: '仓库管理',
        icon: 'ic:twotone-warehouse',
        role: ['SUPERADMIN'],
        requireAuth: true,
        keepAlive: true,
      },
      children: [
        {
          name: 'StoreInfo',
          path: 'store-list',
          component: () => import('./store/store-list.vue'),
          meta: {
            title: '仓库信息',
            icon: 'streamline:shipping-warehouse-delivery-warehouse-shipping-fulfillment',
            role: ['SUPERADMIN'],
            requireAuth: true,
            keepAlive: true,
          },
        },
        {
          name: 'StoreAdd',
          path: 'store-add',
          isHidden: true,
          component: () => import('./store/components/store-add.vue'),
          meta: {
            title: '添加仓库',
            role: ['SUPERADMIN'],
            requireAuth: true,
            keepAlive: true,
          },
        },
        {
          name: 'StoreDetail',
          path: 'inventory-list',
          component: () => import('./store/inventory-list.vue'),
          meta: {
            title: '库存明细',
            icon: 'streamline:warehouse-1',
            role: ['SUPERADMIN'],
            requireAuth: true,
            keepAlive: true,
          },
        },
        {
          name: 'InverntoryDocumentManage',
          path: 'inventory-document',
          redirect: '/admin/inventory/inventory-list/inventory-document/good-inbound-document',
          meta: {
            title: '库单管理',
            icon: 'eva:list-fill',
            role: ['SUPERADMIN'],
            requireAuth: true,
            keepAlive: true,
          },
          children: [
            {
              name: 'GoodsInboundDocument',
              path: 'good-inbound-document',
              component: () => import('./inventory/invention-document/goods-inbound-document.vue'),
              meta: {
                title: '入库单管理',
                icon: 'streamline:receipt-add',
                role: ['SUPERADMIN'],
                requireAuth: true,
                keepAlive: true,
              },
            },
            {
              name: 'GoodsOutboundDocument',
              path: 'goods-outbound-document',
              component: () => import('./inventory/invention-document/goods-outbound-document.vue'),
              meta: {
                title: '出库单管理',
                icon: 'streamline:receipt-subtract',
                role: ['SUPERADMIN'],
                requireAuth: true,
                keepAlive: true,
              },
            },
            {
              name: 'AddOutboundDocument',
              path: 'goods-outbound-document-add',
              isHidden: true,
              component: () => import('./inventory/components/goods-out.vue'),
              meta: {
                title: '添加出库单',
                role: ['SUPERADMIN'],
                requireAuth: true,
                keepAlive: true,
              },
            },
            {
              name: 'GoodsTransferDocument',
              path: 'goods-transfer-document',
              component: () => import('./inventory/invention-document/goods-transfer-document.vue'),
              meta: {
                title: '调拨单管理',
                icon: 'mdi:receipt-send-outline',
                role: ['SUPERADMIN'],
                requireAuth: true,
                keepAlive: true,
              },
            },
          ]
        },
      ],
    },
    {
      name: 'PurchaseManage',
      path: 'purchase',
      redirect: '/admin/purchase/purchase-plan',
      meta: {
        title: '采购管理',
        icon: 'icon-park-outline:buy',
        role: ['SUPERADMIN'],
        requireAuth: true,
        keepAlive: true,
      },
      children: [
        {
          name: 'PurchasePlan',
          path: 'purchase-plan',
          component: () => import('./purchase/purchase-plan.vue'),
          meta: {
            title: '采购计划',
            icon: 'ri:calendar-todo-line',
            role: ['SUPERADMIN'],
            requireAuth: true,
            keepAlive: true,
          },
        },
        {
          name: 'PurchaseDocumentManage',
          path: 'purchase-document-manage',
          component: () => import('./purchase/purchase-document-manage.vue'),
          meta: {
            title: '采购单管理',
            icon: 'material-symbols:receipt-long-outline-rounded',
            role: ['SUPERADMIN'],
            requireAuth: true,
            keepAlive: true,
          },
        },
        {
          name: 'SupplierList',
          path: 'supplier-list',
          component:()=>import ('./supplier/supplier-list.vue'),
          meta:{
            title: '供应商管理',
            icon: 'carbon:scis-transparent-supply',
            role: ['SUPERADMIN'],
            requireAuth: true,
            keepAlive: true,
          }
        }
      ],
    },
    {
      name: 'FinanceManage',
      path: 'finance',
      redirect: '/admin/finance/finance-list',
      meta: {
        title: '财务管理',
        icon: 'streamline:money-cash-coins-stack-accounting-billing-payment-stack-cash-coins-currency-money-finance',
        role: ['SUPERADMIN'],
        requireAuth: true,
        keepAlive: true,
      },
      children: [
        {
          name: 'FinanceIn',
          path: 'finance-in',
          component: () => import('./finance/finance-in.vue'),
          meta: {
            title: '入款单管理',
            icon: 'fluent:subtract-12-filled',
            role: ['SUPERADMIN'],
            requireAuth: true,
            keepAlive: true,
          },
        },
        {
          name: 'FinanceOut',
          path: 'finance-out',
          component: () => import('./finance/finance-out.vue'),
          meta: {
            title: '出款单管理',
            icon: 'ic:baseline-add',
            role: ['SUPERADMIN'],
            requireAuth: true,
            keepAlive: true,
          },
        },
        {
          name: 'FinanceStatics',
          path: 'finance-statics',
          component: () => import('./finance-statics/finance-statics.vue'),
          meta: {
            title: '财务统计',
            icon: 'material-symbols:finance-rounded',
            role: ['SUPERADMIN'],
            requireAuth: true,
            keepAlive: true,
          },
        },
      ],
    },
    {
      name: 'LogisticsManagement',
      path: 'logistics',
      redirect: '/admin/logistics/logistics-list',
      meta: {
        title: '物流管理',
        icon: 'streamline:shipping-transfer-cart-package-box-fulfillment-cart-warehouse-shipping-delivery',
        role: ['SUPERADMIN'],
        requireAuth: true,
        keepAlive: true,
      },
      children: [
        {
          name: 'LogisticsProvider',
          path: 'logistics-provider',
          component: () => import('./logistics/logistics-provider.vue'),
          meta: {
            title: '物流商管理',
            icon: 'ic:outline-person',
            role: ['SUPERADMIN'],
            requireAuth: true,
            keepAlive: true,
          },
        },
        {
          name: 'LogisticsOrder',
          path: 'logistics-order',
          component: () => import('./logistics-statics/logistics-order.vue'),
          meta: {
            title: '物流订单',
            icon: 'iconamoon:delivery-fast-bold',
            role: ['SUPERADMIN'],
            requireAuth: true,
            keepAlive: true,
          },
        },
        {
          name: 'LogisticsDiagram',
          path: 'logistics-diagram',
          component: () => import('./logistics-statics/logistics-diagram.vue'),
          meta: {
            title: '物流报表',
            icon: 'fluent:diagram-24-regular',
            role: ['SUPERADMIN'],
            requireAuth: true,
            keepAlive: true,
          },
        },
      ]
    },
    {
      name: 'SalePromotionManage',
      path: 'sale-promotion',
      redirect: '/admin/sale-promotion/sale-promotion',
      meta: {
        title: '销售管理',
        icon: 'lucide:book-check',
        role: ['SUPERADMIN'],
        requireAuth: true,
        keepAlive: true,
      },
      children: [
        {
          name: 'CustomerOrder',
          path: 'customer-order-list',
          component: () => import('./order/customer-order-list.vue'),
          meta: {
            title: '客户订单',
            icon: 'octicon:list-unordered-16',
            role: ['SUPERADMIN'],
            requireAuth: true,
            keepAlive: true,
          },
        },
        {
          name: 'SalePromotionActivity',
          path: 'sale-promotion-activity',
          component: () => import('./sale-promotion/sale-promotion-activity.vue'),
          meta: {
            title: '促销活动',
            icon: 'material-symbols-light:local-activity-outline-sharp',
            role: ['SUPERADMIN'],
            requireAuth: true,
            keepAlive: true,
          },
        },
      ]
    },
    {
      name: 'CustomerService',
      path: 'customer-service',
      redirect: '/admin/customer-service/customer-service-list',
      meta: {
        title: '客服中心',
        icon: 'ri:customer-service-2-line',
        role: ['SUPERADMIN'],
        requireAuth: true,
        keepAlive: true,
      },
      children: [
        {
          name: 'CustomerManage',
          path: 'customer-manage',
          component: () => import('./customer-service/customer-manage.vue'),
          meta: {
            title: '客户管理',
            icon: 'carbon:customer',
            role: ['SUPERADMIN'],
            requireAuth: true,
            keepAlive: true,
          },
        },
        {
          name: 'AddCustomerForm',
          path: 'customer-add',
          isHidden: true,
          component: () => import('./customer-service/components/customer-add.vue'),
          meta: {
            title: '添加客户',
            role: ['SUPERADMIN'],
            requireAuth: true,
            keepAlive: true,
          },
        },
        {
          name: 'ReviewStatics',
          path: 'review-statics',
          component: () => import('./customer-service/review-statics.vue'),
          meta: {
            title: '评价统计',
            icon: 'carbon:star-review',
            role: ['SUPERADMIN'],
            requireAuth: true,
            keepAlive: true,
          },
        },
      ]
    },
    {
      name: 'System',
      path: 'system',
      redirect: '/admin/system',
      meta: {
        title: '系统中心',
        icon: 'tdesign:system-components',
        role: ['SUPERADMIN'],
        requireAuth: true,
        keepAlive: true,
      },
      children: [
        {
          name: 'AuthorizationManage',
          path: 'authorization-manage',
          component: () => import('./system/authorization-manage.vue'),
          meta: {
            title: '店铺授权',
            icon: 'icon-park-outline:protect',
            role: ['SUPERADMIN'],
            requireAuth: true,
            keepAlive: true,
          },
        },
        {
          name: 'StoreSetting',
          path: 'store-setting',
          component: () => import('./system/store-setting.vue'),
          meta: {
            title: '仓库设置',
            icon: 'tdesign:system-2',
            role: ['SUPERADMIN'],
            requireAuth: true,
            keepAlive: true,
          },
        },
        {
              name: 'ExchangeRateManage',
              path: 'exchange-rate-manage',
              component: () => import('./system/system-setting/exchange-rate-manage.vue'),
              meta: {
                title: '汇率管理',
                icon: 'ri:money-cny-circle-line',
                role: ['SUPERADMIN'],
                requireAuth: true,
              },
            },
            {
              name: 'ServiceConfiguration',
              path: 'service-configuration',
              component: () => import('./system/system-setting/service-configuration.vue'),
              meta: {
                title: '业务配置',
                icon: 'tabler:settings-2',
                role: ['SUPERADMIN'],
                requireAuth: true,
              },
            },
            {
              name: 'SystemLog',
              path: 'system-log',
              component: () => import('./system/system-setting/system-log.vue'),
              meta: {
                title: '系统日志',
                icon: 'gravity-ui:logo-stack-overflow',
                role: ['SUPERADMIN'],
                requireAuth: true,
              },
            },


      ]
    },
    {
      name: 'ChatbotTool',
      path: 'chatbot-tool',
      component: () => import('./system/chatbot-tool.vue'),
      meta: {
        title: 'Chatbot文案生成',
        icon: 'teenyicons:chatbot-outline',
        role: ['SUPERADMIN'],
        requireAuth: true,
        keepAlive: true,
      },
    },
  ],
}
